package 代理模式;

public class Proxy implements Subject {
    RealSubject realSubject;
    Proxy(RealSubject realSubject){
        this.realSubject = realSubject;
    }
    @Override
    public void Request() {
        if (realSubject != null){
            System.out.println("我来代理执行");
            //帮助真实类执行
            realSubject.Request();
        }
    }
}
